<template>
<div>
  <h1>提交</h1>
  输入小说:<input type="text" v-model="xiaodata"><br>
  <button @click="submit">提交</button>
</div>

</template>

<script>
import axios from 'axios';
export default {
name: "xiaoshangchuan"
,
  data(){
    return{
      xiaodata:'',
      userid:2,
    }
  },
  methods:{
  submit(){
    axios({url:'http://127.0.0.1:5000/tianjiaxiao',method:'post',data:{userid:this.userid,content:this.xiaodata}}).then(res=>{
      console.log(res)
    })
  },
    
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>